package com.nuedu.corejava.ch9.homework;
//2、编写一个程序，实现从命令行参数输入一字符串，统计该字符串中字符“e”出现的次数。（识点：String中常用的方法） [必做题]
import java.util.Scanner;

public class HomeWork2 {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		System.out.println("请输入一行字符");
		String a = scanner.nextLine();
		String b = a.replaceAll("e", "");
		int count = a.length()-b.length();
		System.out.println(a);
		System.out.println(b);
		System.out.println("e出现的次数为"+count);
	}

}
